﻿//----------------------------------------------------------------
// Desc: 
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2011-11-24
//
// Update Date :            
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


class FAPI FUI_SliderEx : public FUI_Slider
{
    FUI_DECLARE_CLASS(FUI_SliderEx)

public:
    FUI_SliderEx(EF_UI_WIDGET_TYPE t = eUWT_SliderEx);
    virtual void Render(EF_UI_RENDER_LAYER layer);
    virtual void UpdateRect();
    virtual bool IsChild(FUI_Object* pChild);
    virtual int GetLeftWidth(){ return (int)m_btnLB.GetWidth(); }
    virtual int GetRightWidth(){ return (int)m_btnRB.GetWidth(); }
    virtual bool OnMouseMove(funit nX, funit nY);
    virtual bool OnLButtonDown(funit nX, funit nY);
    virtual bool OnLButtonUp(funit nX, funit nY);

    // 获取部分控件数据
    FINLINE FUI_Button& GetLB(){ return m_btnLB; }
    FINLINE FUI_Button& GetRB(){ return m_btnRB; }

protected:
    virtual void InitUIData(FUI_Object* father, fuWidgetBase* pData, FUI_Layout* layout);

protected:
    fuWidgetSliderEx* pSliderExData;
    FUI_Button m_btnLB, m_btnRB;
};